package com.softhis.rekrutacja.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.mvp4g.client.Mvp4gModule;
import com.softhis.rekrutacja.client.commons.SasakExceptionHandler;

/**
 * Main entry point.
 *
 * @author Sasak
 */
public class SasakEntryPoint implements EntryPoint{
	
	
	 /** 
     * Creates a new instance of SasakEntryPoint
     */
	public SasakEntryPoint(){
		
	}
	
	/** 
     * The entry point method, called automatically by loading a module
     * that declares an implementing class as an entry-point
     */
	public void onModuleLoad(){

		GWT.setUncaughtExceptionHandler(new SasakExceptionHandler());
		
        Mvp4gModule module = (Mvp4gModule)GWT.create(Mvp4gModule.class);
        module.createAndStartModule();
        RootPanel.get("main").add((Widget)module.getStartView());
	}

}
